#pragma once

#include <map>

typedef std::map<std::string, unsigned int> QueryTermMap;
typedef std::map<std::string, float > QueryWeightMap;

class QueryTerm
{
public:

	QueryTerm(void);
	virtual ~QueryTerm(void);
	void AddWord(std::string name, int multiplier, bool isEnchant);
	QueryTermMap& GetTermFrequency() { return m_QueryTermMap; };
	QueryWeightMap& GetTermWeight() { return m_QueryTermWeightMap; };
	QueryWeightMap& GetMultiply() { return m_QueryMultiplyMap; };
	unsigned int GetLength() { return m_Length; };
	float GetNormalizedWeight() { return m_NormalizedWeight; };
	void CalWeight();
private:
	unsigned int m_Length;
	QueryTermMap m_QueryTermMap;
	QueryWeightMap m_QueryTermWeightMap;
	QueryWeightMap m_QueryMultiplyMap;
	float m_NormalizedWeight;
};
